Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags. |
Utility Plugins
Description: This tutorial presents various utility plugins that are useful for the video pluginsTutorial Level: BEGINNER
Next Tutorial: Gazebo Video Monitor Plugin
Contents
A set of utility plugins is available to be used along with the monitor plugins.
Camera Contains Plugin
Publishes a list of camera names when one or more of the tracked models enter the space of a box container.
Multiple instances of this plugin can be used to automatically transition the video to specific cameras when activity is detected in certain areas.
To use the plugin, add one or more configurations like the following in your world file:
<plugin name="container" filename="libcamera_contains_plugin.so"> <!-- Rate at which to check for collisions with the tracked models --> <updateRate>30</updateRate> <visualize>false</visualize> <trackedModels>[robot_model_name]</trackedModels> <cameras>[camera_0, camera_1]</cameras> <topic>gazebo/camera_select</topic> <pose>3 0 1 0 0 0</pose> <!-- Pose of the container --> <size>2 3 2</size> <!-- Size of the container --> </plugin>
The camera names to publish is dependent on the video plugin used. For instance, for the multi-view plugin, you might configure something like this:
<cameras>[camera_0, '', '', camera_1]</cameras>
This means the second and third view in the video will be blacked out.